import { Map } from "immutable";
import * as actionTypes from "./constance";

const defaultState = Map({
  countriesCode: [],
  userInfo: [],
});

const a = (state = defaultState, action) => {
  switch (action.type) {
    case actionTypes.COUNTRIESCODELIST:
      return state.set("countriesCode", action.countriesCodeInfo);
    case actionTypes.USERINFO:
      return state.set("userInfo", action.userInfo);
    default:
      return state;
  }
};

export default a;
